\hypertarget{classsock_1_1net_1_1_tcp_acceptor}{}\section{sock\+:\+:net\+:\+:Tcp\+Acceptor Class Reference}
\label{classsock_1_1net_1_1_tcp_acceptor}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}


连接接收器  




{\ttfamily \#include $<$tcp\+\_\+acceptor.\+h$>$}

Inheritance diagram for sock\+:\+:net\+:\+:Tcp\+Acceptor\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classsock_1_1net_1_1_tcp_acceptor}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef boost\+::function$<$ \hyperlink{namespacesock_1_1net_ac7ab8c7fe4e8e023f2fea799b74122ed}{Tcp\+Connection\+Ptr} \&(sock\+\_\+t)$>$ \hyperlink{classsock_1_1net_1_1_tcp_acceptor_ae9d6183dfcfdc39fee3d3cd861fd7ad2}{Tcp\+Connecton\+Get\+Func}
\item 
typedef boost\+::function$<$ void(\hyperlink{namespacesock_1_1net_ac7ab8c7fe4e8e023f2fea799b74122ed}{Tcp\+Connection\+Ptr} \&)$>$ \hyperlink{classsock_1_1net_1_1_tcp_acceptor_a4f61b7c7e32c3cc975f394efbfced020}{Pass\+Tcp\+Connection\+Ptr\+Ref\+Func}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classsock_1_1net_1_1_tcp_acceptor_a459593c127612503a4c6c21a677a43f5}{Tcp\+Acceptor} (void)
\item 
virtual \hyperlink{classsock_1_1net_1_1_tcp_acceptor_affefddc37347a117e5a51dfe86cd781f}{$\sim$\+Tcp\+Acceptor} (void)
\item 
bool \hyperlink{classsock_1_1net_1_1_tcp_acceptor_a3f7e8ab49db7fa4b333430d0cf0f13ce}{open} (const char $\ast$addr, int port, int backlog)
\begin{DoxyCompactList}\small\item\em 启动接收器 \end{DoxyCompactList}\item 
void \hyperlink{classsock_1_1net_1_1_tcp_acceptor_a1e55a3bc5b17b5960419afe981c4b3f7}{close} (void)
\begin{DoxyCompactList}\small\item\em 关闭接收器 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1_tcp_acceptor_ad93eec19093d98d84aaa7f74486373f7}{handle\+Input} (void)
\begin{DoxyCompactList}\small\item\em 处理网络输入 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1_tcp_acceptor_a8c313189b9166036e374750ddc64ea97}{handle\+Output} (void)
\begin{DoxyCompactList}\small\item\em 处理网络输出 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1_tcp_acceptor_aaff5bd626bb6e5a1ce1c972fb6faf593}{handle\+Error} (void)
\begin{DoxyCompactList}\small\item\em 处理网络错误 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1_tcp_acceptor_aef1361f3392c7757cc0fc0a13b15163d}{handle\+Close} (void)
\begin{DoxyCompactList}\small\item\em 处理关闭 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1_tcp_acceptor_afd658b58966444f446dd9b1cf747a04c}{handle\+Heartbeat} (void)
\begin{DoxyCompactList}\small\item\em 处理心跳 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classsock_1_1net_1_1_tcp_acceptor_a3ecf3132e8c4bf890c07853cfab7619c}{Tcp\+Server}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
连接接收器 

\subsection{Member Typedef Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_acceptor_a4f61b7c7e32c3cc975f394efbfced020}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!Pass\+Tcp\+Connection\+Ptr\+Ref\+Func@{Pass\+Tcp\+Connection\+Ptr\+Ref\+Func}}
\index{Pass\+Tcp\+Connection\+Ptr\+Ref\+Func@{Pass\+Tcp\+Connection\+Ptr\+Ref\+Func}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{Pass\+Tcp\+Connection\+Ptr\+Ref\+Func}]{\setlength{\rightskip}{0pt plus 5cm}typedef boost\+::function$<$void({\bf Tcp\+Connection\+Ptr}\&)$>$ {\bf sock\+::net\+::\+Tcp\+Acceptor\+::\+Pass\+Tcp\+Connection\+Ptr\+Ref\+Func}}\label{classsock_1_1net_1_1_tcp_acceptor_a4f61b7c7e32c3cc975f394efbfced020}
\hypertarget{classsock_1_1net_1_1_tcp_acceptor_ae9d6183dfcfdc39fee3d3cd861fd7ad2}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!Tcp\+Connecton\+Get\+Func@{Tcp\+Connecton\+Get\+Func}}
\index{Tcp\+Connecton\+Get\+Func@{Tcp\+Connecton\+Get\+Func}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{Tcp\+Connecton\+Get\+Func}]{\setlength{\rightskip}{0pt plus 5cm}typedef boost\+::function$<${\bf Tcp\+Connection\+Ptr}\&(sock\+\_\+t)$>$ {\bf sock\+::net\+::\+Tcp\+Acceptor\+::\+Tcp\+Connecton\+Get\+Func}}\label{classsock_1_1net_1_1_tcp_acceptor_ae9d6183dfcfdc39fee3d3cd861fd7ad2}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_acceptor_a459593c127612503a4c6c21a677a43f5}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!Tcp\+Acceptor@{Tcp\+Acceptor}}
\index{Tcp\+Acceptor@{Tcp\+Acceptor}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{Tcp\+Acceptor(void)}]{\setlength{\rightskip}{0pt plus 5cm}Tcp\+Acceptor\+::\+Tcp\+Acceptor (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_tcp_acceptor_a459593c127612503a4c6c21a677a43f5}
\hypertarget{classsock_1_1net_1_1_tcp_acceptor_affefddc37347a117e5a51dfe86cd781f}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!````~Tcp\+Acceptor@{$\sim$\+Tcp\+Acceptor}}
\index{````~Tcp\+Acceptor@{$\sim$\+Tcp\+Acceptor}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{$\sim$\+Tcp\+Acceptor(void)}]{\setlength{\rightskip}{0pt plus 5cm}Tcp\+Acceptor\+::$\sim$\+Tcp\+Acceptor (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_acceptor_affefddc37347a117e5a51dfe86cd781f}


\subsection{Member Function Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_acceptor_a1e55a3bc5b17b5960419afe981c4b3f7}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!close@{close}}
\index{close@{close}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{close(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Acceptor\+::close (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_tcp_acceptor_a1e55a3bc5b17b5960419afe981c4b3f7}


关闭接收器 

\hypertarget{classsock_1_1net_1_1_tcp_acceptor_aef1361f3392c7757cc0fc0a13b15163d}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!handle\+Close@{handle\+Close}}
\index{handle\+Close@{handle\+Close}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{handle\+Close(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Acceptor\+::handle\+Close (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_acceptor_aef1361f3392c7757cc0fc0a13b15163d}


处理关闭 



Implements \hyperlink{classsock_1_1net_1_1_net_event_handler_a27cc7b4bb1bdbe49694651630e446b05}{sock\+::net\+::\+Net\+Event\+Handler}.

\hypertarget{classsock_1_1net_1_1_tcp_acceptor_aaff5bd626bb6e5a1ce1c972fb6faf593}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!handle\+Error@{handle\+Error}}
\index{handle\+Error@{handle\+Error}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{handle\+Error(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Acceptor\+::handle\+Error (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_acceptor_aaff5bd626bb6e5a1ce1c972fb6faf593}


处理网络错误 



Implements \hyperlink{classsock_1_1net_1_1_net_event_handler_aaae522780e3cbf9db5756be8589f9139}{sock\+::net\+::\+Net\+Event\+Handler}.

\hypertarget{classsock_1_1net_1_1_tcp_acceptor_afd658b58966444f446dd9b1cf747a04c}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!handle\+Heartbeat@{handle\+Heartbeat}}
\index{handle\+Heartbeat@{handle\+Heartbeat}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{handle\+Heartbeat(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Acceptor\+::handle\+Heartbeat (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_acceptor_afd658b58966444f446dd9b1cf747a04c}


处理心跳 



Implements \hyperlink{classsock_1_1net_1_1_net_event_handler_aa75f2bf4bf3bcd9a83d540aca5497619}{sock\+::net\+::\+Net\+Event\+Handler}.

\hypertarget{classsock_1_1net_1_1_tcp_acceptor_ad93eec19093d98d84aaa7f74486373f7}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!handle\+Input@{handle\+Input}}
\index{handle\+Input@{handle\+Input}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{handle\+Input(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Acceptor\+::handle\+Input (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_acceptor_ad93eec19093d98d84aaa7f74486373f7}


处理网络输入 



Implements \hyperlink{classsock_1_1net_1_1_net_event_handler_a6fe4d2cffe11a7e21012eb29ed2f393d}{sock\+::net\+::\+Net\+Event\+Handler}.

\hypertarget{classsock_1_1net_1_1_tcp_acceptor_a8c313189b9166036e374750ddc64ea97}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!handle\+Output@{handle\+Output}}
\index{handle\+Output@{handle\+Output}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{handle\+Output(void)}]{\setlength{\rightskip}{0pt plus 5cm}void Tcp\+Acceptor\+::handle\+Output (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_acceptor_a8c313189b9166036e374750ddc64ea97}


处理网络输出 



Implements \hyperlink{classsock_1_1net_1_1_net_event_handler_a2a7887f74cac4207c80225e12ce91a43}{sock\+::net\+::\+Net\+Event\+Handler}.

\hypertarget{classsock_1_1net_1_1_tcp_acceptor_a3f7e8ab49db7fa4b333430d0cf0f13ce}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!open@{open}}
\index{open@{open}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{open(const char $\ast$addr, int port, int backlog)}]{\setlength{\rightskip}{0pt plus 5cm}bool Tcp\+Acceptor\+::open (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{addr, }
\item[{int}]{port, }
\item[{int}]{backlog}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1_tcp_acceptor_a3f7e8ab49db7fa4b333430d0cf0f13ce}


启动接收器 


\begin{DoxyParams}{Parameters}
{\em addr} & 监听地址 \\
\hline
{\em port} & 监听端口 \\
\hline
{\em backlog} & 监听队列长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
bool 
\end{DoxyReturn}


\subsection{Friends And Related Function Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_acceptor_a3ecf3132e8c4bf890c07853cfab7619c}{}\index{sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}!Tcp\+Server@{Tcp\+Server}}
\index{Tcp\+Server@{Tcp\+Server}!sock\+::net\+::\+Tcp\+Acceptor@{sock\+::net\+::\+Tcp\+Acceptor}}
\subsubsection[{Tcp\+Server}]{\setlength{\rightskip}{0pt plus 5cm}friend class {\bf Tcp\+Server}\hspace{0.3cm}{\ttfamily [friend]}}\label{classsock_1_1net_1_1_tcp_acceptor_a3ecf3132e8c4bf890c07853cfab7619c}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
E\+:/git/sock/sock/net/\hyperlink{tcp__acceptor_8h}{tcp\+\_\+acceptor.\+h}\item 
E\+:/git/sock/src/net/\hyperlink{tcp__acceptor_8cc}{tcp\+\_\+acceptor.\+cc}\end{DoxyCompactItemize}
